package server

import (
	"encoding/json"
	"net/http"
)

func sendJSON(w *http.ResponseWriter, v interface{}) {
	if err := json.NewEncoder(*w).Encode(v); err != nil {
		jsonError(*w, http.StatusInternalServerError, "", "send json failed")
	}
}
